home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_06_06 / v6n6089a.txt < prev    next >
Text File  |  1989-09-26  |  325b  |  16 lines

  1.  \NLETTER\6.6\CURVES5.PRGProgram 5
  2.  
  3.     incr1 = 2*(dy-dx);
  4.     incr2 = 2*dy;
  5.     r = y1;
  6.     p = 2dy - 2dx;
  7.     for (xi=x1; xi<=x2; xi++)
  8.     {
  9.         plot(xi,r);
  10.         if (p >= 0)
  11.             {
  12.             r++; p += incr1;
  13.             }
  14.         else p += incr2;
  15.     }
  16.